<template>
	<view class="page">
		<detail :title="title" 
		:name="name"
		:idCard="idCard"
		:phone="phone"
		:start="start"
		:end="end"
		:type="type"
		:id="id"></detail>
	</view>
</template>

<script>
	import detail from '~@/components/detail.vue'
	let result={}
	let list=[]
	export default {
		components:{
			detail
		},
		data() {
			return {
				title:'',
				start:'',
				name:'',
				idCard:'',
				phone:'',
				end:'',
				type:'',
				id:'',
			}
		},
		onLoad:function(e){
			if(e.type==='入校申请'){
				list=uni.getStorageSync("inList")
			}
			else{
				list=uni.getStorageSync("outList")
			}
			console.log("list:",list);
			list.forEach((item)=>{
				console.log("item.id:",item.id);
				if(item.id==e.id){
					console.log("item:",item);
					result=item
				}
			})
			console.log("result:",result);
			this.title=result.title;
			this.name=result.name;
			this.phone=result.tel;
			this.idCard=result.idCard;
			this.start=result.startTime;
			this.end=result.endTime;
			this.type=result.type;
			this.id=result.id;
		}
	}
</script>

<style>
	
</style>
